<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<meta name="author" content="YZC">
	<meta name="copyright" content="YZC">
	<title>${message("admin.permission.edit")} - ${setting.siteName}</title>
	<link href="${base}/favicon.ico" rel="icon">
	<link href="${base}/resources/admin/css/bootstrap.css" rel="stylesheet">
	<link href="${base}/resources/admin/css/bootstrap-checkbox-x.css" rel="stylesheet">
	<link href="${base}/resources/admin/css/animate.css" rel="stylesheet">
	<link href="${base}/resources/admin/css/adminLTE.css" rel="stylesheet">
	<link href="${base}/resources/admin/css/common.css" rel="stylesheet">
	<!--[if lt IE 9]>
		<script src="${base}/resources/admin/js/html5shiv.js"></script>
		<script src="${base}/resources/admin/js/respond.js"></script>
	<![endif]-->
	<script src="${base}/resources/admin/js/jquery.js"></script>
	<script src="${base}/resources/admin/js/bootstrap.js"></script>
	<script src="${base}/resources/admin/js/bootstrap-checkbox-x.js"></script>
	<script src="${base}/resources/admin/js/jquery.validate.js"></script>
	<script src="${base}/resources/admin/js/adminLTE.js"></script>
	<script src="${base}/resources/admin/js/common.js"></script>
	<script type="text/javascript">
	$().ready(function() {
	
		var $inputForm = $("#inputForm");
		
		[@flash_message /]
		
		// 表单验证
		$inputForm.validate({
			rules: {
				"permission.name": "required",
				"permission.value": "required",
				"permission.url": "required",
				"permission.module": "required"
			}
		});
	});
	</script>
</head>
<body class="hold-transition sidebar-mini">
	<div class="container-fluid">
		<section class="content-header">
			<h1>${message("admin.permission.edit")}</h1>
			<ol class="breadcrumb">
				<li>
					<a href="${base}/admin/index" target="_top">
						<i class="fa fa-home"></i>
						${message("admin.common.index")}
					</a>
				</li>
				<li class="active">${message("admin.permission.edit")}</li>
			</ol>
		</section>
		<section class="content">
			<div class="row">
				<div class="col-xs-12">
					<form id="inputForm" class="form-horizontal" action="${base}/admin/permission/update" method="post">
						<input type="hidden" name="permission.id" value="${permission.id}" />
						<div class="box">
							<div class="box-body">
								<div class="form-group">
									<label class="col-xs-2 control-label item-required" for="name">${message("Permission.name")}:</label>
									<div class="col-xs-4">
										<input name="permission.name" class="form-control" type="text" value="${permission.name}" maxlength="200">
									</div>
								</div>
								<div class="form-group">
									<label class="col-xs-2 control-label item-required" for="value">${message("Permission.value")}:</label>
									<div class="col-xs-4">
										<input name="permission.value" class="form-control" type="text" value="${permission.value}" maxlength="200">
									</div>
								</div>
								<div class="form-group">
									<label class="col-xs-2 control-label item-required" for="url">${message("Permission.url")}:</label>
									<div class="col-xs-4">
										<input name="permission.url" class="form-control" type="text" value="${permission.url}" maxlength="220">
									</div>
								</div>
								<div class="form-group">
									<label class="col-xs-2 control-label item-required" for="module">${message("Permission.module")}:</label>
									<div class="col-xs-4">
										<input name="permission.module" class="form-control" type="text" value="${permission.module}" maxlength="200">
									</div>
								</div>
								<div class="form-group">
									<label class="col-xs-2 control-label" for="description">${message("Permission.description")}:</label>
									<div class="col-xs-4">
										<input name="permission.description" class="form-control" type="text" value="${permission.description}" maxlength="200">
									</div>
								</div>
								<div class="form-group">
									<label class="col-xs-2 control-label" for="is_enabled">${message("admin.common.setting")}:</label>
									<div class="col-xs-4 checkbox">
										<input id="isEnabled" name="permission.is_enabled" type="text" value="${permission.is_enabled}" data-toggle="checkbox-x">
										<label for="isEnabled" class="cbx-label">${message("Permission.is_enabled")}</label>
									</div>
								</div>
							</div>
							<div class="box-footer">
								<div class="row">
									<div class="col-xs-4 col-xs-offset-2">
										<button class="btn btn-primary" type="submit">${message("admin.common.submit")}</button>
										<button class="btn btn-default" type="button" data-toggle="back">${message("admin.common.back")}</button>
									</div>
								</div>
							</div>
						</div>
					</form>
				</div>
			</div>
		</section>
	</div>
</body>
</html>